<?php
error_reporting(0);
if (!session_id()) session_start();
include("conn/conn.php");
$telphone = $_POST[mobi];
$sql=mysql_query("select * from tb_user where tel=".$telphone,$conn);
$user=mysql_fetch_array($sql);

if($user){
$_SESSION["telphone"]=$telphone;
$_SESSION["username"]=$user['truename'];
} else {
$_SESSION["telphone"]=$telphone;
$_SESSION["username"]='';
}
	 echo "<script>window.location.href='customer.php';</script>";
  exit();
?>